- document = @data[conference.id][:document]
- reports = @data[conference.id][:reports]

.post.preview.with-blocks{:id => dom_id(conference)}
  %h2.title
    = link_to "#{document.title}(#{@data[conference.id][:status]})", documents_conference_path(conference)

  .member-actions.box
    = render :partial => 'member_links', :locals => {:conference => conference, :member => @data[conference.id][:member]}

  .clearfix

  .img
    = link_to documents_conference_path(conference) do
      = image_tag document.image.url(:thumb)

  .entry
    = entry document.body, :length => 700

    - tags = @data[conference.id][:document_tags]
    - if tags.present?
      .box
        %h2= t('themes')
        .tags
          - links_for_tags(tags) do |tag|
            = tag
    .box
      = link_to t('conferences.visit'), documents_conference_path(conference), :class => "btn primary"
      - if can? :conferences_moderator
        = link_to t('edit'), edit_documents_conference_path(conference), :class => "btn"

  .side
    .info.box
      %h2= t('information')
      %dl
        %dt= t('status')
        %dd= @data[conference.id][:status]
        .separator
        %dt= t('conferences.info.organizer')
        %dd= link_to document.user.full_name, "#"
        .separator
        %dt= t('conferences.info.members_count')
        %dd
          %span.members-count
            = @data[conference.id][:members_count]
        .separator
        %dt= t('reports')
        %dd= reports.count
        .separator
        %dt= t('conferences.info.start_date')
        %dd= l conference.start_date
        .separator
        %dt= t('conferences.info.end_date')
        %dd= l conference.end_date
        .clearfix

    .reports.box
      %h2= t('reports')
      - if reports.present?
        %ul
          - reports.each do |report|
            %li= link_to report.document.title.truncate(40), documents_conference_report_path(conference, report)
            .separator
      - else
        %p= t 'no_data'

